<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh-CN" class="ie8"> <![endif]-->
<html lang="zh-CN">

<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>我的众筹</title>
	<meta content="telephone=no,email=no,address=no" name="format-detection" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<meta name="msapplication-tap-highlight" content="no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="wap-font-scale" content="no">
	<meta name="Keywords" content="" />
	<meta name="Description" content="" />

	<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/User/css/common.css" />
	<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/User/css/user.css" />
	<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/User/css/color-style.css" />
	<link rel="stylesheet" type="text/css" href="/themes/wnsc_moblie/Public/css/public.css">
	<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/dropload.css" />
	<script type="text/javascript" src="/themes/wnsc_moblie/newMobile/User/js/area/jquery.min.js"></script>
	<script type="text/javascript" src="/themes/wnsc_moblie/Public/js/common.js"></script>
	<script src="/themes/wnsc_moblie/newMobile/Shop/css/dropload.js"></script>
	<script src="/themes/wnsc_moblie/newMobile/Shop/js/layer.js"></script>
	<script type="text/javascript" src="/themes/wnsc_moblie/newMobile/User/js/flexible.js"></script>
	<script src="/themes/wnsc_moblie/newMobile/User/js/iscroll.js"></script>
	<script type="text/javascript" src="/themes/wnsc_moblie/newMobile/User/js/navbarscroll.js"></script>
	<link rel="stylesheet" href="/themes/wnsc_moblie/Public/layui/css/layui.css">
	<script src="/themes/wnsc_moblie/Public/layui/layui.js"></script>
	<style type="text/css">
		.wrapper02 {position:relative;height: 2rem;width: 100%;overflow: hidden;margin:0 auto;background:#fff}
		.wrapper02 .scroller {position:absolute}
		.wrapper02 .scroller li {height: 2rem;color:#333;float: left;line-height: 2rem;font-size: .4rem;text-align: center}
		.wrapper02 .scroller li a{color:#333;display:block;margin:0 .7rem}
		.wrapper02 .scroller li.cur a{color: #f23030;border-bottom: 2px solid #f23030;padding-bottom: 2px; height: 90%;}
		.no-data-div{display: none;}
	</style>
</head>

<body>
<?php
				$agent = $_SERVER['HTTP_USER_AGENT'];
				if(strpos($agent,"Html5Plus") === false){
			?>
<header>
	<div class="tab_nav">
		<div class="header">
			<div class="header-left">
				<a class="sb-back" href="javascript:history.back(-1)" title="返回"></a>
			</div>
			<div class="header-middle">我的众筹
			</div>
			<div class="header-right">
				<aside class="show-menu-btn">
					<div class="show-menu" id="show_more">
						<a href="javascript:void(0)"></a>
					</div>
				</aside>
			</div>
		</div>
	</div>
</header>
<mtc_include file="Public:right_nav" />
<?php
				}
			?>
<div class="order-box">
	<div class="wrapper02" id="nav_list">
		<div class="scroller" style="width: 100%;background: #fff;">
			<ul class="clearfix"  style="width: 100%;" >
				<li data="1" style="width: 50%;" class="cur"><a href="javascript:void(0)" id='order_all' >已支付({$count})</a></li>
				<li data="2" style="width: 50%;"><a href="javascript:void(0)" id='order_unpayed' >未支付({$wcount})</a></li>
			</ul>
		</div>
	</div>
	<script type="text/javascript">
        $(function(){
            $('#nav_list').navbarscroll({
                defaultSelect:{$_GET['status']|default='0'} ,
                endClickScroll:function(obj){
                    console.log(obj.attr('data'));
                    var k=obj.attr('data');
                    //alert(k);
                    $('.tablelist-append').hide();
                    $('.show'+k).show();
                    get_crowdfunding_list(k);
                    $('.dropload-down').remove();
                }
            });
        });
	</script>

	<div class="order-center-content" id="table_list">
		<div class="tablelist-append show1">
			<!--全部-->
			<div id="list1">
				<div class="no-data-div">
					<div class="no-data-img">
						<img src="/themes/wnsc_moblie/Public/images/bg_empty_list.png">
					</div>
					<dl>
						<dt>您目前没有支持任何项目</dt>
					</dl>

					<a href="/crowdfunding/index" class="no-data-btn">立即去支持</a>

				</div>
			</div>
		</div>
		<div class="tablelist-append show2">
			<!--待付款-->
			<div id="list2">
				<div class="no-data-div">
					<div class="no-data-img">
						<img src="/themes/wnsc_moblie/Public/images/bg_empty_list.png">
					</div>
					<dl>
						<dt>您目前没有支持任何项目</dt>
					</dl>

					<a href="/crowdfunding/index" class="no-data-btn">立即去支持</a>


				</div>
			</div>
		</div>
	</div>
	<a href="javascript:void(0);" id="back-to-top" class="gotop hide">
		<img src="/themes/wnsc_moblie/Public/picture/topup.png">
	</a>
	<script>
        $(document).ready(function() {
            //首先将#back-to-top隐藏
            $("#back-to-top").addClass('hide');
            //当滚动条的位置处于距顶部1000像素以下时，跳转链接出现，否则消失
            $(function() {
                $(window).scroll(function() {
                    if($(window).scrollTop() > 800) {
                        $("#back-to-top").removeClass('hide');
                    } else {
                        $("#back-to-top").addClass('hide');
                    }
                });
                //当点击跳转链接后，回到页面顶部位置
                $("#back-to-top").click(function() {
                    $('body,html').animate({
                        scrollTop: 0
                    }, 600);
                    return false;
                });

                $('body').on('touchstart', '.edit-order',function() {
                    var type=$(this).attr('data-type');
                    var order_id=$(this).attr('data-id');
                    //关闭订单
                    if(type=='close_order'){
                        var statu = confirm("是否确认取消订单?");
                        if(!statu){
                            return false;
                        }
                        $.ajax({
                            type:'POST',
                            url:'{:U("user/close_order")}',
                            data:{order_id:order_id},
                            success:function(msg){
                                if(msg.code == 1){
                                    layer.msg(msg.message);
                                    setTimeout(window.location.href='/user/crowdfunding/status/1.html',1000)

                                }else{
                                    layer.msg(msg.message);
                                }
                            },
                            error:function(){
                                layer.msg('网络故障!');
                            }
                        });
                    }
                    //确认订单
                    if(type=='queren_get'){
                        var statu = confirm("是否确认收货?");
                        if(!statu){
                            return false;
                        }
                        $.ajax({
                            type:"post",
                            url:'{:U("user/confirm_order")}',
                            data:{order_id:order_id},
                            success:function(data){
                                if(data.code==1){
                                    layer.msg(data.message)
                                    setTimeout('window.location.href="/user/crowdfunding/status/0.html"',1000);
                                }
                                if(data.code==0){
                                    layer.msg(data.message)
                                }
                            }
                        });

                    }
                    //立即评价
                    if(type=='evaluation'){
                        window.location.href='/user/reviewcommodity/id/'+order_id+'.html';
                    }
                });
            });
        });

        function get_crowdfunding_list(type) {
            var url = "{:U('user/ajax_getcrowdfunding_list')}";

            var amount = 6;
            layui.use('flow', function(){
                var $ = layui.jquery; //不用额外加载jQuery，flow模块本身是有依赖jQuery的，直接用即可。
                var flow = layui.flow;
                flow.load({
                    elem: '.show'+type //指定列表容器
                    ,done: function(page, next){ //到达临界点（默认滚动触发），触发下一页
                        var lis = [];
                        $.ajax({
                            type: 'post',
                            url: url,
                            data: {
                                page: page,
                                stauts: type
                            },
                            dataType: 'json',
                            success: function(res) {
                                if(page==1&&res.content==''){
                                    $('.no-data-div').show();
                                    next(lis.join(''), page < res.pages);
                                    $('.layui-flow-more').hide();
                                }else{
                                    $('.no-data-div').hide();
                                    lis.push(res.content)
                                    next(lis.join(''), page < res.pages);
                                }


                            }
                        });

                    }
                });
            });
        }
	</script>
</div>
<!--底部菜单 start-->

<div style="height: 48px; line-height: 48px; clear: both;"></div>
<mtc_include file="Public:footer" />
</body>

</html>